<?php

/**
* local collection functions of tocmenu_43
*
* @author Adesanto Asman
* @version 1.0
* @license Free
* @copyright Copyright (c)2007, Adesanto Asman
* @package CLocal
*
*/

/**
* @package CLocal
*
*/
class CLocal{

  /**
   * cash bank tx type
   * @see MST_CASH_BANK_TX
   *
   * @param unknown_type $inOut
   * @param unknown_type $cbTxTypeName
   * @param unknown_type $txType
   */
  function CbTxType( $inOut,
                     $cbTxTypeName,
                    &$txType){

    switch($inOut){

      case _CASH_BANK_IN:

        switch($cbTxTypeName){

          case _CASH_BANK_TX_CASH:

            $txType = _CASH_IN;
            break;

          case _CASH_BANK_TX_BANK:

            $txType = _BANK_IN;
            break;

          case _CASH_BANK_TX_GIRO:

            $txType = _GIRO_IN;
            break;

          default:
            Misc::usrDieJs("Error: Unknown Tx");
        }
        break;

      case _CASH_BANK_OUT:

        switch($cbTxTypeName){

          case _CASH_BANK_TX_CASH:

            $txType = _CASH_OUT;
            break;

          case _CASH_BANK_TX_BANK:

            $txType = _BANK_OUT;
            break;

          case _CASH_BANK_TX_GIRO:

            $txType = _GIRO_OUT;
            break;

          default:
            Misc::usrDieJs("Error: Unknown Tx");
        }
        break;

      default:
        Misc::usrDieJs("Error: Unknown Type");
    }
  }
}
?>